'Requires XUI and JavaObject. Declare xui As XUI in the calling module.
Dim chart As UIBubbleChart
chart.Initialize(Me, "Chart")
chart.AddToParent(Activity, 10dip, 10dip, 340dip, 300dip)
chart.setAnimation(True, 700)
chart.setTextTitle("Deals by probability")
'Grid, axes, and numeric scales are enabled by default for coordinate charts.
chart.setShowGrid(True)
chart.setShowAxes(True)
chart.setShowYAxisValues(True)
'Equal sizes display a scatter plot; otherwise circle area is proportional to size.
Dim labels As List = Array As String("A", "B", "C")
Dim xs As List = Array As Float(15, 40, 75)
Dim ys As List = Array As Float(35, 65, 50)
Dim sizes As List = Array As Float(20, 60, 35)
Dim colors As List = Array As Int(0xAA29B3B9, 0xAA8D7AF5, 0xAAF7B13B)
If chart.SetData(labels, xs, ys, sizes, colors) = False Then Log("Invalid chart data")
'Long-press data points or shapes to display their values.
$end$

